package com.eascs.ticket.user.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.eascs.ticket.common.dao.BaseDao;
import com.eascs.ticket.user.entity.User;

@Repository
public class UserDao extends BaseDao {

	public List<Object[]> getValidUserDataSouceList() {
		return this.findObjectsList("select code,name from user where status = 'ok'");
	}

	public List<Object[]> getAllUserDataSouceList() {
		return this.findObjectsList("select code,name from user ");
	}

	public User getUserByCode(String userCode) {
		User user = new User();
		user.setCode(userCode);
		return this.findEntityWithAny(user);
	}
}
